/*
 * Copyright 2008 Jens Meiss
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package hmvc.j2me.framework.component;

import hmvc.component.IComponent;
import hmvc.j2me.framework.controller.IHmvcController;
import hmvc.j2me.framework.events.IHmvcEvent;
import hmvc.j2me.framework.events.IHmvcEventListener;
import hmvc.j2me.framework.model.IHmvcModel;
import hmvc.j2me.framework.view.IHmvcView;

/**
 * @author jens.meiss
 * 
 * This Interface extends the IComponent Interface and adds hmvc4j2me-framework specific
 * Methods to the Component.
 */
public interface IHmvcComponent {

	public IHmvcComponent addChildComponent(IHmvcController controller);
	
	public IHmvcComponent addChildComponent(IHmvcController controller,
			IHmvcModel model);
	
	public IHmvcComponent addChildComponent(IHmvcController controller,
			IHmvcView view);
	
	public IHmvcComponent addChildComponent(IHmvcController controller, IHmvcModel model, 
			IHmvcView view);

	public void fireEvent(IHmvcEvent event, boolean up, boolean local, boolean down);
	
	public IHmvcController getHmvcController();
	
	public IHmvcModel getHmvcModel();
	
	public IHmvcView getHmvcView();

	public void setHmvcController(IHmvcController controller);

	public void setHmvcModel(IHmvcModel model);

	public void setHmvcView(IHmvcView model);
	
	public IComponent getComponent();
	
	public void register(Class classOfEvent, IHmvcEventListener listener);
	
}
